/*
 * @Author: yayalee yangcheng960813@163.com
 * @Date: 2024-07-15 09:18:15
 * @LastEditTime: 2024-07-15 09:49:47
 * @LastEditors: yayalee yangcheng960813@163.com
 * @Description: 
 * @FilePath: \unfinished-challenges\assets\core_cc\component\component.ts
 * 可以输入预定的版权声明、个性签名、空行等
 */

import { Component } from "cc";
import { EDITOR } from "cc/env";

if (!EDITOR) {
    Object.defineProperty(Component.prototype, "w", {
        get: function () {
            return this.node.w;
        },
        set: function (v) {
            this.node.w = v;
        }
    });
    Object.defineProperty(Component.prototype, "h", {
        get: function () {
            return this.node.h;
        },
        set: function (v) {
            this.node.h = v;
        }
    });


    Object.defineProperty(Component.prototype, "x", {
        get: function () {
            return this.node.x;
        },
        set: function (v) {
            this.node.x = v;
        }
    });
    Object.defineProperty(Component.prototype, "y", {
        get: function () {
            return this.node.y;
        },
        set: function (v) {
            this.node.y = v;
        }
    });
    Object.defineProperty(Component.prototype, "z", {
        get: function () {
            return this.node.z;
        },
        set: function (v) {
            this.node.z = v;
        }
    });
}

